module permutation(P_out,P_in);

input  wire[63:0] P_in;
output wire[63:0] P_out;
//P_layer替换表格
assign P_out[0 ] = P_in[0 ];
assign P_out[16] = P_in[1 ];
assign P_out[32] = P_in[2 ];
assign P_out[48] = P_in[3 ];
assign P_out[1 ] = P_in[4 ];
assign P_out[17] = P_in[5 ];
assign P_out[33] = P_in[6 ];
assign P_out[49] = P_in[7 ];
assign P_out[2 ] = P_in[8 ];
assign P_out[18] = P_in[9 ];
assign P_out[34] = P_in[10];
assign P_out[50] = P_in[11];
assign P_out[3 ] = P_in[12];
assign P_out[19] = P_in[13];
assign P_out[35] = P_in[14];
assign P_out[51] = P_in[15];

assign P_out[4 ] = P_in[16];
assign P_out[20] = P_in[17];
assign P_out[36] = P_in[18];
assign P_out[52] = P_in[19];
assign P_out[5 ] = P_in[20];
assign P_out[21] = P_in[21];
assign P_out[37] = P_in[22];
assign P_out[53] = P_in[23];
assign P_out[6 ] = P_in[24];
assign P_out[22] = P_in[25];
assign P_out[38] = P_in[26];
assign P_out[54] = P_in[27];
assign P_out[7 ] = P_in[28];
assign P_out[23] = P_in[29];
assign P_out[39] = P_in[30];
assign P_out[55] = P_in[31];

assign P_out[8 ] = P_in[32];
assign P_out[24] = P_in[33];
assign P_out[40] = P_in[34];
assign P_out[56] = P_in[35];
assign P_out[9 ] = P_in[36];
assign P_out[25] = P_in[37];
assign P_out[41] = P_in[38];
assign P_out[57] = P_in[39];
assign P_out[10] = P_in[40];
assign P_out[26] = P_in[41];
assign P_out[42] = P_in[42];
assign P_out[58] = P_in[43];
assign P_out[11] = P_in[44];
assign P_out[27] = P_in[45];
assign P_out[43] = P_in[46];
assign P_out[59] = P_in[47];

assign P_out[12] = P_in[48];
assign P_out[28] = P_in[49];
assign P_out[44] = P_in[50];
assign P_out[60] = P_in[51];
assign P_out[13] = P_in[52];
assign P_out[29] = P_in[53];
assign P_out[45] = P_in[54];
assign P_out[61] = P_in[55];
assign P_out[14] = P_in[56];
assign P_out[30] = P_in[57];
assign P_out[46] = P_in[58];
assign P_out[62] = P_in[59];
assign P_out[15] = P_in[60];
assign P_out[31] = P_in[61];
assign P_out[47] = P_in[62];
assign P_out[63] = P_in[63];

endmodule